(global.webpackJsonp = global.webpackJsonp || []).push([ [ "pages/home/components/home-price/user-price-popup" ], {
    2257: function(e, n, i) {
        i.r(n);
        var t = i("a4ea"), o = i.n(t);
        for (var a in t) [ "default" ].indexOf(a) < 0 && function(e) {
            i.d(n, e, function() {
                return t[e];
            });
        }(a);
        n.default = o.a;
    },
    "4f25": function(e, n, i) {},
    "72dd": function(e, n, i) {
        i.r(n);
        var t = i("c6bf"), o = i("2257");
        for (var a in o) [ "default" ].indexOf(a) < 0 && function(e) {
            i.d(n, e, function() {
                return o[e];
            });
        }(a);
        i("d25a");
        var r = i("f0c5"), u = Object(r.a)(o.default, t.b, t.c, !1, null, "2f0dea1d", null, !1, t.a, void 0);
        n.default = u.exports;
    },
    a4ea: function(e, n, i) {
        (function(e) {
            var t = i("4ea4").default;
            Object.defineProperty(n, "__esModule", {
                value: !0
            }), n.default = void 0;
            var o = t(i("a34a")), a = t(i("ded3")), r = t(i("c973")), u = t(i("9523")), c = i("fd0e"), l = i("665c"), d = i("8083"), s = i("48b8"), p = i("86e8"), v = i("5125"), f = i("5bfa"), m = i("737a"), h = i("05dc"), g = i("cee8"), _ = i("f00d"), y = i("8f93"), P = i("f4f3"), b = i("c9ca"), I = {};
            I.props = {
                hideQuotationType: {
                    type: Boolean,
                    default: !1
                },
                page: String
            }, I.setup = function(n, i) {
                var t = n, I = i.emit, T = (0, l.useState)(), x = T.selectedService, C = T.historyPricePopupExpo, B = (0, 
                c.reactive)({
                    title: "历史成交价",
                    historyPriceList: []
                }), k = (0, c.ref)("手动输入"), S = (0, c.ref)(!1), w = (0, c.ref)(!1), D = (0, c.ref)(null), F = "\n  font-size: 48rpx;\n  text-align: left;\n  font-family: 'TG-TYPE-Bold';\n", N = (0, 
                c.computed)(function() {
                    return S.value && 3 === U.bargainConfig.length ? "width: 202rpx" : "";
                }), R = (0, l.useStore)(), U = (0, c.reactive)({
                    show: !1,
                    config: {},
                    resolver: null,
                    input: "",
                    checkDiscussItem: {},
                    bargainConfig: [],
                    userPriceCheckedItemId: m.UserPricetemId.myBid,
                    autoScalingInfo: {
                        open: !1,
                        unit: "元",
                        inputStyle: "\n      ".concat(F, "\n      display: flex;\n      align-items: baseline;\n    "),
                        unitStyle: "\n      width: 24rpx;\n      font-size: 24rpx;\n      font-family: PingFang TC, PingFang TC-500;\n      font-weight: 500;\n      color: rgba(0, 0, 0, 0.85);\n      margin-left: 4rpx; // 因微信input字体不支持设置价格字体，导致光标不能和假的展示文案同步，需要前置设置大一点光标\n    "
                    }
                }), A = (0, l.useState)(), E = A.systemInfo, O = A.quotationPrice, j = (A.isShowModel, 
                A.homePriceItem, A.bargainTypeInfo), L = (0, l.useGetters)(), M = L.commonStatisticsState, $ = (L.frameCity, 
                L.selectedVehicle), H = L.isUserQuotationNoBid, Q = L.startAddress, V = L.endAddress, Y = (0, 
                c.computed)(function() {
                    var e, n, i, t = null === (e = _.allCalculatInfo.value) || void 0 === e || null === (n = e.priceConditions) || void 0 === n ? void 0 : n.findIndex(function(e) {
                        return (null == e ? void 0 : e.pricePlan) === f.PricePlan.userQuotation;
                    });
                    return (null === (i = (0, v.useShowInfo)({
                        index: t,
                        code: p.ShowTextsCode.NO_OFFER_ORDER_INPUT_HINT
                    })) || void 0 === i ? void 0 : i.text) || "请出价";
                }), z = (0, c.computed)(function() {
                    var e = "font-weight: normal; font-size: 32rpx;";
                    return te.value() ? "\n          ".concat(e, "\n          height: 48rpx;\n          line-height: 48rpx;\n          font-family: PingFang SC, PingFang SC-400;\n          color: #979797;\n        ") : e;
                }), G = (0, c.computed)(function() {
                    return te.value() ? "\n        ".concat(F, "\n          caret-color: #FF6600;\n          color: transparent;\n          font-size: 42rpx; // 因微信input字体不支持设置价格字体，导致光标不能和假的展示文案同步，需要前置调整下字体的大小\n        ") : S.value ? "\n        font-size: 44rpx;\n        caret-color: #f60;\n        text-align: right;\n        font-weight: bold;\n        font-family: 'TG-TYPE-Bold';\n      " : "\n        font-size: 44rpx;\n        caret-color: #f60;\n        text-align: right;\n        font-weight: bold;\n      ";
                }), q = null, J = null, K = [];
                (0, c.onMounted)(function() {
                    var e;
                    J = null === (e = (0, c.getCurrentInstance)()) || void 0 === e ? void 0 : e.proxy;
                }), (0, c.onUnmounted)(function() {
                    q && q.disconnect();
                });
                var W = (0, c.computed)(function() {
                    return te.value() ? "\n          padding: 0;\n        " : "";
                }), X = (0, c.computed)(function() {
                    return "";
                }), Z = (0, c.computed)(function() {
                    var e;
                    return !t.hideQuotationType && (null === (e = U.bargainConfig) || void 0 === e ? void 0 : e.length) > 1;
                }), ee = (0, c.computed)(function() {
                    var e = 0;
                    return X.value || (e = 50), Z.value ? (0, d.rpx2px)(480 - e) : (0, d.rpx2px)(200 - e);
                }), ne = (0, c.computed)(function() {
                    var e, n, i, t, o, a, r = null === (e = _.allCalculatInfo.value) || void 0 === e ? void 0 : e.priceConditions, u = null == r ? void 0 : r.find(function(e) {
                        return f.PricePlanTuples.normalPrice.includes(e.pricePlan);
                    }), c = (null === (n = _.allCalculatInfo.value) || void 0 === n || null === (i = n.userQuotationItem) || void 0 === i ? void 0 : i.basePriceValueFen) || 0, l = null == u || null === (t = u.distanceInfo) || void 0 === t ? void 0 : t.distanceTotal;
                    return l || (l = null === (o = r[0]) || void 0 === o || null === (a = o.distanceInfo) || void 0 === a ? void 0 : a.distanceTotal), 
                    {
                        totalPrice: c,
                        totalDistance: l
                    };
                }), ie = (0, c.computed)(function() {
                    var e, n, i;
                    return (null === (e = _.allCalculatInfo.value) || void 0 === e || null === (n = e.priceConditions) || void 0 === n || null === (i = n.find(function(e) {
                        return (null == e ? void 0 : e.pricePlan) === f.PricePlan.userQuotation;
                    })) || void 0 === i ? void 0 : i.suggestPriceInfo) || {};
                }), te = (0, c.computed)(function() {
                    return function() {
                        var e, n = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 2;
                        return (null === (e = ie.value) || void 0 === e ? void 0 : e.suggestPriceStyle) === n;
                    };
                }), oe = (0, c.computed)(function() {
                    return function(e) {
                        return te.value() && U.userPriceCheckedItemId === e;
                    };
                }), ae = (0, c.computed)(function() {
                    var e;
                    return (0, s.div)((null === (e = ie.value) || void 0 === e ? void 0 : e.suggestPriceFen) || 0, 100);
                }), re = (0, c.computed)(function() {
                    return te.value() && oe.value(m.UserPricetemId.historicalRecommendedPrice) ? ae.value : Number(U.input) || "";
                }), ue = (0, c.computed)(function() {
                    var e, n = (0, s.div)(O.value || 0, 100);
                    return te.value(1) && !n ? (0, s.div)((null === (e = ie.value) || void 0 === e ? void 0 : e.suggestPriceFen) || 0, 100) : n;
                }), ce = (0, c.computed)(function() {
                    return function(e) {
                        var n, i = e.bargainType, t = (U.checkDiscussItem || {}).bargainType, o = H.value(U.checkDiscussItem);
                        return H.value(e) ? {
                            0: "https://static.huolala.cn/image/b70584e1d0b34dbdcc5a2526aad1f32ad2ec9443.png",
                            1: "https://static.huolala.cn/image/d0644324182a8415b56166f59ec09c93dc3f97a8.png"
                        }[Number(o)] : (n = {}, (0, u.default)(n, m.BargainType.telephone, {
                            0: "https://static.huolala.cn/image/03087801c6aaa99643801e9cd4bc3dd5468317a9.png",
                            1: "https://static.huolala.cn/image/da567e2394658a163ae4697caf1a698028ea533d.png"
                        }), (0, u.default)(n, m.BargainType.online, {
                            0: "https://static.huolala.cn/image/f51bc83067c64e07a1e80ccbb62065db699f5187.png",
                            1: "https://static.huolala.cn/image/e5c516eb932917b1f210b1ee4b9eda0e9671a2f0.png"
                        }), n)[i][Number(i === t && !o)];
                    };
                }), le = (0, c.computed)(function() {
                    var e, n, i, t = null === (e = _.allCalculatInfo.value) || void 0 === e || null === (n = e.priceConditions) || void 0 === n ? void 0 : n.findIndex(function(e) {
                        return (null == e ? void 0 : e.pricePlan) === f.PricePlan.userQuotation;
                    });
                    return (null === (i = (0, v.useShowInfo)({
                        index: t,
                        code: p.ShowTextsCode.CATEGORY_NAME
                    })) || void 0 === i ? void 0 : i.text) || "议价用车";
                });
                function de() {
                    var e, n = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 1;
                    null !== (e = E.value) && void 0 !== e && e.isIos ? setTimeout(function() {
                        var e, i, t, o;
                        1 === n ? null == D || null === (e = D.value) || void 0 === e || null === (i = e.handleFocus) || void 0 === i || i.call(e) : null == D || null === (t = D.value) || void 0 === t || null === (o = t.handleBlur) || void 0 === o || o.call(t);
                    }, 300) : setTimeout(function() {
                        var e, i, t, o;
                        1 === n ? null == D || null === (e = D.value) || void 0 === e || null === (i = e.handleFocus) || void 0 === i || i.call(e) : null == D || null === (t = D.value) || void 0 === t || null === (o = t.handleBlur) || void 0 === o || o.call(t);
                    }, 100);
                }
                function se(e) {
                    return pe.apply(this, arguments);
                }
                function pe() {
                    return (pe = (0, r.default)(o.default.mark(function n(i) {
                        var r, u, c, l, d, p;
                        return o.default.wrap(function(n) {
                            for (;;) switch (n.prev = n.next) {
                              case 0:
                                return n.next = 3, (0, y.getUserOrderHistoryPriceList)({
                                    start_city_id: Q.value.city_id || 0,
                                    end_city_id: V.value.city_id || 0,
                                    std_vehicle_id: null === (r = $.value) || void 0 === r ? void 0 : r.standard_order_vehicle_id,
                                    total_price: ne.value.totalPrice,
                                    quotation_min: (0, s.yuanToFen)(i.min),
                                    quotation_max: (0, s.yuanToFen)(i.max),
                                    distance_km: ne.value.totalDistance,
                                    price_calculate_id: _.priceCalculateId.value,
                                    order_vehicle_id: null === (u = $.value) || void 0 === u ? void 0 : u.order_vehicle_id
                                });

                              case 3:
                                if (0 === (c = n.sent).ret) {
                                    n.next = 7;
                                    break;
                                }
                                return (0, g.$error)({
                                    title: c.msg || P.API_ERROR_MESSAGE
                                }), n.abrupt("return");

                              case 7:
                                return S.value = Boolean(!(0, s.isEmpty)(c.data)), S.value && (B.title = c.data.title, 
                                B.historyPriceList = c.data.history_quotation_list, (0, h.statistics)("history_price_expo", {
                                    vehicle_select_name: null === (l = $.value) || void 0 === l ? void 0 : l.name,
                                    vehicle_select_id: null === (d = $.value) || void 0 === d ? void 0 : d.order_vehicle_id,
                                    national_standard_id: null === (p = $.value) || void 0 === p ? void 0 : p.standard_order_vehicle_id,
                                    frame_city: Q.value.city_name,
                                    business_type: x.value,
                                    price_calculate_id: _.priceCalculateId.value,
                                    order_price: ne.value.totalPrice,
                                    history_order_list: B.historyPriceList.map(function(e) {
                                        return e.order_no;
                                    }).join(","),
                                    history_order_expolist: B.historyPriceList.slice(0, 3).map(function(e) {
                                        return e.order_no;
                                    }).join(",")
                                }), setTimeout(function() {
                                    (q = e.createIntersectionObserver(J, {
                                        observeAll: !0
                                    })).relativeTo(".historical-transaction-price").observe(".price-card", function(e) {
                                        var n, i;
                                        e.intersectionRatio > 0 && (K.find(function(n) {
                                            var i;
                                            return n.order_no === (null == e || null === (i = e.dataset) || void 0 === i ? void 0 : i.orderNo);
                                        }) || K.push({
                                            order_no: (null == e || null === (n = e.dataset) || void 0 === n ? void 0 : n.orderNo) || "",
                                            price: (null == e || null === (i = e.dataset) || void 0 === i ? void 0 : i.price) || 0
                                        }));
                                    });
                                }, 500)), U.config = i, ge(i.bargainTypeInfo), U.input = ue.value || "", U.show = !0, 
                                R.commit("setState", {
                                    isShowModel: !0
                                }), (0, b.hideTabBar)(), U.userPriceCheckedItemId === m.UserPricetemId.myBid && (S.value ? de(2) : de()), 
                                (0, h.statistics)("price_popup_expo", (0, a.default)((0, a.default)({}, M.value), {}, {
                                    page_exposure: "修改报价弹窗页",
                                    popup_from: U.config.isPassivity ? "首页_被动触发" : "".concat(t.page, "_回头车_").concat(U.config.input > 0 ? "出价修改" : "出价输入"),
                                    price_calculate_id: _.priceCalculateId.value,
                                    guiding_price_amount: (0, s.multi)(ae.value, 100),
                                    order_uuid: ""
                                })), n.abrupt("return", new Promise(function(e) {
                                    U.resolver = e;
                                }));

                              case 18:
                              case "end":
                                return n.stop();
                            }
                        }, n);
                    }))).apply(this, arguments);
                }
                function ve() {
                    var e, n;
                    U.bargainConfig = (null === (e = _.allCalculatInfo.value) || void 0 === e || null === (n = e.context) || void 0 === n ? void 0 : n.bargainTypes) || [];
                }
                function fe() {
                    var n = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0;
                    D.value.handleBlur(), U.show = !1, (0, b.showTabBar)(), me(n ? "确定" : "关闭"), setTimeout(function() {
                        e.hideKeyboard();
                    }, 300), q && q.disconnect(), K = [];
                }
                function me(e) {
                    var n, i = U.checkDiscussItem.bargainType, o = (0, a.default)((0, a.default)({}, M.value), {}, {
                        module_name: e,
                        price_type: k.value,
                        price_amount: re.value,
                        price_choose_type: H.value(U.checkDiscussItem) ? "不议价" : (n = {}, (0, u.default)(n, m.BargainType.telephone, "电话议价"), 
                        (0, u.default)(n, m.BargainType.online, "线上议价"), n)[i],
                        popup_from: "".concat(t.page, "_回头车_").concat(U.config.input > 0 ? "出价修改" : "出价输入"),
                        price_calculate_id: _.priceCalculateId.value,
                        guiding_price_amount: (0, s.multi)(ae.value, 100),
                        order_price: ne.value.totalPrice,
                        order_uuid: ""
                    });
                    if (S.value) {
                        o.guiding_price_amount = (0, s.yuanToFen)(U.input);
                        var r = 0;
                        C.value.isUseHistoryPrice && (r = B.historyPriceList.findIndex(function(e) {
                            return Number(e.price) === (0, s.yuanToFen)(Number(U.input));
                        }) + 1), o.history_order_list = B.historyPriceList.map(function(e) {
                            return e.order_no;
                        }).join(","), o.history_order_expolist = K.map(function(e) {
                            return e.order_no;
                        }).join(","), o.history_order_sort = r;
                    }
                    (0, h.statistics)("price_popup_click", o);
                }
                function he(e) {
                    (0, h.statistics)("price_toast", {
                        module_name: e,
                        price_calculate_id: _.priceCalculateId.value,
                        price_amount: String((0, s.multi)(Number(re.value), 100))
                    });
                }
                function ge() {
                    var e, n = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : j.value;
                    return ve(), (null === (e = U.bargainConfig) || void 0 === e ? void 0 : e.length) > 1 ? U.checkDiscussItem = (0, 
                    s.isEmpty)(n) ? (0, v.useDefaultCheckDiscussItem)() : (0, v.useDefaultCheckDiscussItem)(n) : U.checkDiscussItem = (0, 
                    v.useDefaultCheckDiscussItem)(), U.checkDiscussItem;
                }
                return (0, c.watch)(function() {
                    return U.input;
                }, function(e) {
                    U.autoScalingInfo.open = te.value() && !!e;
                }, {
                    immediate: !0
                }), (0, c.onBeforeMount)(function() {
                    I("loaded", {
                        open: se,
                        hide: fe,
                        getCheckedBargainType: ge
                    });
                }), Object.assign({
                    fenToYuan: s.fenToYuan,
                    UserPricetemId: m.UserPricetemId,
                    historyPriceConfig: B,
                    historyPriceAB: S,
                    inputFocusActive: w,
                    input: D,
                    dynamicDiscussTypeStyle: N,
                    data: U,
                    placeholder: Y,
                    placeholderStyle: z,
                    inputStyle: G,
                    inputBoxStyle: W,
                    warningTips: X,
                    showBargainType: Z,
                    dynamicCursorSpacing: ee,
                    getSuggestPriceInfo: ie,
                    hitBargainingVehicleRecommendedAB: te,
                    selectPriceType: oe,
                    historicalRecommendedPrice: ae,
                    getUserPrice: re,
                    selectedIcon: ce,
                    popupTitle: le,
                    handleDiscussItemClick: function(e) {
                        U.checkDiscussItem = e;
                    },
                    handleFocus: function() {
                        if (S.value) {
                            if (k.value = "手动输入", B.historyPriceList.length < 2) return;
                            setTimeout(function() {
                                w.value = !0;
                            }, 50);
                        }
                    },
                    handleBlur: function() {
                        S.value && (w.value = !1);
                    },
                    hide: fe,
                    usePrice: function(e, n, i) {
                        var t, o, r;
                        U.input = Math.floor((0, s.fenToYuan)(e)), k.value = "历史成交价", (0, h.statistics)("history_price_click", (0, 
                        a.default)((0, a.default)({}, M.value), {}, {
                            vehicle_select_name: null === (t = $.value) || void 0 === t ? void 0 : t.name,
                            vehicle_select_id: null === (o = $.value) || void 0 === o ? void 0 : o.order_vehicle_id,
                            national_standard_id: null === (r = $.value) || void 0 === r ? void 0 : r.standard_order_vehicle_id,
                            frame_city: Q.value.city_name,
                            business_type: x.value,
                            price_calculate_id: _.priceCalculateId.value,
                            order_price: ne.value.totalPrice,
                            history_order_sort: i,
                            guiding_price_amount: e,
                            order_uuid: n
                        }));
                    },
                    submit: function() {
                        var e, n, i = U.config, t = i.min, o = i.max;
                        if (Number(t) > Number(re.value)) return he("出价过低toast"), (0, g.$error)({
                            title: "出价过低，请酌情加价"
                        });
                        if (Number(o) > 0 && Number(o) < Number(re.value)) return he("出价过高toast"), (0, g.$error)({
                            title: "出价过高，请重新出价"
                        });
                        (0, b.showTabBar)();
                        var a = {
                            input: re.value,
                            bargainTypeInfo: U.checkDiscussItem
                        };
                        if (null === (e = (n = U.config).cb) || void 0 === e || e.call(n, a), null == U || U.resolver(a), 
                        S.value) {
                            var r = Number(U.input) || 0, u = K.find(function(e) {
                                return e.price === (0, s.yuanToFen)(r);
                            }), c = "".concat($.value.standard_order_vehicle_id, "-").concat(Q.value.city_id, "-").concat(V.value.city_id);
                            R.commit("setState", {
                                historyPricePopupExpo: {
                                    displayHistoryPriceSign: c,
                                    isUseHistoryPrice: Boolean(u)
                                }
                            });
                        }
                        fe(1);
                    },
                    selectPrice: function(e) {
                        te.value() && (de(e === m.UserPricetemId.myBid ? 1 : 2), U.userPriceCheckedItemId = e);
                    }
                }, {
                    open: se,
                    hide: fe,
                    getCheckedBargainType: ge
                });
            }, I.components = Object.assign({
                BottomPopup: function() {
                    Promise.all([ i.e("common/vendor"), i.e("components/bottom-popup/index") ]).then(function() {
                        return resolve(i("54a1"));
                    }.bind(null, i)).catch(i.oe);
                },
                HInput: function() {
                    Promise.all([ i.e("common/vendor"), i.e("components/h-input/index") ]).then(function() {
                        return resolve(i("6def"));
                    }.bind(null, i)).catch(i.oe);
                },
                HCheckbox: function() {
                    i.e("components/h-checkbox/index").then(function() {
                        return resolve(i("45cc"));
                    }.bind(null, i)).catch(i.oe);
                },
                KeyboardPadding: function() {
                    Promise.all([ i.e("common/vendor"), i.e("components/keybord/keyboard-padding") ]).then(function() {
                        return resolve(i("a8cc"));
                    }.bind(null, i)).catch(i.oe);
                }
            }, I.components);
            var T = I;
            n.default = T;
        }).call(this, i("543d").default);
    },
    c6bf: function(e, n, i) {
        i.d(n, "b", function() {
            return t;
        }), i.d(n, "c", function() {
            return o;
        }), i.d(n, "a", function() {});
        var t = function() {
            var e = this, n = (e.$createElement, e._self._c, e.hitBargainingVehicleRecommendedAB()), i = e.data.bargainConfig.length, t = e.selectPriceType(e.UserPricetemId.myBid), o = e.hitBargainingVehicleRecommendedAB(), a = e.hitBargainingVehicleRecommendedAB(), r = a ? e.selectPriceType(e.UserPricetemId.myBid) : null, u = e.hitBargainingVehicleRecommendedAB(), c = u ? e.selectPriceType(e.UserPricetemId.historicalRecommendedPrice) : null, l = u ? e.selectPriceType(e.UserPricetemId.historicalRecommendedPrice) : null, d = e.showBargainType ? e.__map(e.data.bargainConfig, function(n, i) {
                var t = e.__get_orig(n), o = e.data.bargainConfig.length < 3 && !e.historyPriceAB;
                return {
                    $orig: t,
                    g1: o,
                    m8: o ? e.selectedIcon(n) : null
                };
            }) : null, s = e.historyPriceAB ? e.__map(e.historyPriceConfig.historyPriceList, function(n, i) {
                return {
                    $orig: e.__get_orig(n),
                    m9: e.fenToYuan(n.order_price)
                };
            }) : null;
            e.$mp.data = Object.assign({}, {
                $root: {
                    m0: n,
                    g0: i,
                    m1: t,
                    m2: o,
                    m3: a,
                    m4: r,
                    m5: u,
                    m6: c,
                    m7: l,
                    l0: d,
                    l1: s
                }
            });
        }, o = [];
    },
    d25a: function(e, n, i) {
        var t = i("4f25");
        i.n(t).a;
    }
} ]), (global.webpackJsonp = global.webpackJsonp || []).push([ "pages/home/components/home-price/user-price-popup-create-component", {
    "pages/home/components/home-price/user-price-popup-create-component": function(e, n, i) {
        i("543d").createComponent(i("72dd"));
    }
}, [ [ "pages/home/components/home-price/user-price-popup-create-component" ] ] ]);